#include "StdAfx.h"
#include "StrConst.h"
#include "Kernel.h"

extern Kernel* g_kernel;

StrConst::StrConst(void)
{
}

StrConst::~StrConst(void)
{
}


/** Load Strings */
void StrConst::LoadStrings( const std::string &fileName )
{
    if ( !g_kernel )
        return;
    
    MFile* file = g_kernel->GetVFileSystem()->OpenFile( fileName );
    if( file && file->Opened() )
    {
        int i = 0;
        while( !file->IsEnd() )
        {
            m_Strings[ file->ReadNext(":") ] = file->ReadNext(":"); 
        }
        file->Close();
    }
    
}